package com.sudoku.sound;

import com.badlogic.gdx.audio.Music;
import com.badlogic.gdx.audio.Sound;

public class ConsoleAudio implements IAudio {

	private Music currentMusic;

	public ConsoleAudio() {
		currentMusic = null;
	}

	public void playSound(Sound sound, float volume) {
		sound.play(volume);
	}

	@Override
	public void stopSound(Sound sound) {
		sound.stop();
	}

	@Override
	public void stopAllSounds() {
	}

	@Override
	public void playMusic(Music music, float volume) {
		currentMusic = music;
		currentMusic.play();
		currentMusic.setVolume(volume);
		currentMusic.setLooping(false);
	}

	@Override
	public void stopMusic() {
		if (currentMusic != null) {
			currentMusic.stop();
		}
	}

	@Override
	public void setMusicVolume(float vol) {
		if (currentMusic != null) {
			currentMusic.setVolume(vol);
		}
	}

	@Override
	public Music getMusic() {
		return currentMusic;
	}

	@Override
	public void setSoundFXVolume(float vol) {
		// TODO Auto-generated method stub

	}
}
